package com.cxx.purchasecharge.core.model.persistence;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.cxx.purchasecharge.core.model.BaseModel;

/**
 * 系统设置
 * 
 * @author xiang
 * 
 */
@Entity
@Table (name = "pc_setting_group")
public class SettingGroup extends BaseModel
{
    private static final long serialVersionUID = 1L;

    private long id;
    private String name;
    private String display;

    private List <SettingKeyValue> subSettings;
    
    public SettingGroup () {}

    @Id
    @GeneratedValue (strategy = GenerationType.AUTO)
    public long getId ()
    {
        return id;
    }

    public void setId (long id)
    {
        this.id = id;
    }

    @Column (nullable = false)
    public String getName ()
    {
        return name;
    }

    public void setName (String name)
    {
        this.name = name;
    }

    @Column (nullable = false)
    public String getDisplay ()
    {
        return display;
    }

    public void setDisplay (String display)
    {
        this.display = display;
    }

    @OneToMany (mappedBy = "group")
    public List <SettingKeyValue> getSubSettings ()
    {
        return subSettings;
    }

    public void setSubSettings (List <SettingKeyValue> subSettings)
    {
        this.subSettings = subSettings;
    }

}
